package com.aaa.sbm.controller;

import com.aaa.sbm.service.StatisticsService;
import com.aaa.sbm.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("statistics")
public class StatisticsController {

    @Resource
    private StatisticsService statisticsService;

    @GetMapping("daily")
    public Result getDailyStatistics(@RequestParam String date) {
        return statisticsService.getDailyStatistics(date);
    }
}
